package com.r2coding.system.feign;

import com.r2coding.common.to.RegisterEmailTo;
import com.r2coding.common.util.Result;
import com.r2coding.system.model.SystemEmailReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 远程调用三方服务
 *
 * @author:98k灬
 * @since:2022/08/13 14:31
 **/
@FeignClient("blog-third-party")
public interface ThirdPartyFeignService {

    @GetMapping("/api/email/sendEmail/{email}")
    Result sendEmail(@PathVariable("email") String email);

    @PostMapping("/api/email/sendSystemEmail")
    Result sendSystemEmail(@RequestBody SystemEmailReq req);

    @PostMapping("/api/email/sendRegisterEmail")
    Result sendRegisterEmail(@RequestBody RegisterEmailTo to);
}
